﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Vit.Database
{
    public class DatabaseFileInfo
    {
        public string FileType { get; set; }
        public string Name { get; set; }
        public long Size { get; set; }
        public decimal Megabytes
        {
            get { return Convert.ToDecimal((Size / 1024)); }
        }
        public string FileName { get; set; }
        public string ShortFileName
        {
            get
            {
                string sname = string.Format("{0}...{1}", FileName.Substring(0, FileName.IndexOf('\\') + 1), FileName.Substring(FileName.LastIndexOf('\\', FileName.LastIndexOf('\\') - 1)));
                return sname;
            }
        }
    }
}
